<?php
include("includes/top_user.php");
if(isset($_SESSION['userid'])&&$_SESSION['level']!=2)
{
	
	header ("location: login.php");
	exit();
}
?>

<div id="box">
<h3>
Upload Hình Ảnh
</h3>
<form action="image_upload.php" method="post">
<table
<tr>
<td>Nhập số công cụ uploader :</td>
<td><input type="text" name="txtnum" value=""  /> </td>
<td><input type="submit" value="Ok !" name="ok" /></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['ok']))
{
	$num = $_POST['txtnum'];
	echo "<hr /> <br />";
	echo "<b> Bạn đã chọn ".$num." file uploader </b>";
	echo "<form action='image_doupload.php?file=$num' method='post' enctype='multipart/form-data'>";
	for($i=1; $i<=$num; $i++)
	{
		echo "Uploader ".$i.": <input type='file' name='img[]' /><br /><br />";
	}
	echo "<input type='submit' value='Upload' name='ok_upload' />";
	echo "</form>";
	
}
?>
</div>
<?php
include("includes/sidebar.php");
include("includes/footer.php");
?>